package org.notepad.activity;

import org.notepad.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;

public class AddTimeTrackerActivity extends Activity {
	Intent intent;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.add_tracker);
	}

	public boolean onCreateOptionsMenu(Menu m){
		return false;
	}
	
	public void onCancel(View view){
		finish();
	}
	
	public void onSave(View view){
		intent = getIntent();
		EditText time_view = (EditText) findViewById(R.id.add_time);
		intent.putExtra("time", time_view.getText().toString());
		EditText note_view = (EditText)findViewById(R.id.add_note);
		intent.putExtra("note", note_view.getText().toString());
		this.setResult(RESULT_OK, intent);
		finish();
	}
	
}
